/*
 This file is part of BTStracker
		
    BTStracker is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    BTStracker is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.	
	author: azbest.pro (azbest.pro@gmail.com)
*/
package pl.vdl.azbest.mremote.gui.shell;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.layout.GridData;

import pl.vdl.azbest.log.LoggingTheGathering;
import pl.vdl.azbest.log.gui.composite.CompositeSystemConsole;
import pl.vdl.azbest.mremote.Conf;
import pl.vdl.azbest.mremote.gui.SWTElement;
/**
 * 
 * CompositeSystemConsole Wrapper
 * @author azbest
 * */
public class SystemConsole extends SWTElement{

	//private Shell sShell = null;  //  @jve:decl-index=0:visual-constraint="49,59"

	/**
	 * This method initializes sShell
	 */
	@Override
	protected void createSShell() {
		GridData gridData = new GridData();
		gridData.horizontalAlignment = GridData.FILL;
		gridData.grabExcessHorizontalSpace = true;
		gridData.grabExcessVerticalSpace = true;
		gridData.verticalAlignment = GridData.FILL;
		sShell = new Shell();
		sShell.setText("System Console");
		sShell.setSize(new Point(484, 290));
		sShell.setLayout(new GridLayout());
		sShell.addShellListener(new org.eclipse.swt.events.ShellAdapter() {
			public void shellClosed(org.eclipse.swt.events.ShellEvent e) {
				Conf.getInstance().consoleOpen=false;
			}
		});
		CompositeSystemConsole csc = new CompositeSystemConsole(sShell,SWT.NONE);
		csc.setLayoutData(gridData);
		Conf.getInstance().consoleOpen=true;
	}
	{
		LoggingTheGathering.addPath(getClass().getName());
	}

}
